package personal.xjl._23java1studentdemo.spring;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Component("niumowang")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Cow {
    @Value("niumowang")
    private String name;
    @Value("500")
    private int weight;

    public void run() {
        System.out.println(name + " 正在奔跑");
    }
}